/**
 * This class is the model for the Store
 * @author Sravya
 *
 */
public class StoreModel 
{
	private Item[] itemList;
	private final static int NUM_ITEMS = 7;
	private final static int STORE_QUANTITY_FOR_ITEM = Integer.MAX_VALUE;
	/**
	 * This is the constructor for the store where all the items are initialized
	 */
	public StoreModel()
	{
		itemList = new Item[NUM_ITEMS];
		
		itemList[0] = new Item("Gas", STORE_QUANTITY_FOR_ITEM);
		itemList[1] = new Item("Food", STORE_QUANTITY_FOR_ITEM);
		itemList[2] = new Item("Clothes", STORE_QUANTITY_FOR_ITEM);
		itemList[3] = new Item("Ammunition", STORE_QUANTITY_FOR_ITEM);
		itemList[4] = new Item("Spare Wheels", STORE_QUANTITY_FOR_ITEM);
		itemList[5] = new Item("Spare Axles", STORE_QUANTITY_FOR_ITEM);
		itemList[6] = new Item("Spare Engine", STORE_QUANTITY_FOR_ITEM);
	}
	/**
	 * This is the getter for the price of the item
	 * @param index
	 * @return
	 */
	public double getPrice(int index)
	{
		return itemList[index].getPrice();
	}
	/**
	 * This is the getter for the type of the item
	 * @param index
	 * @return
	 */
	public String getType(int index)
	{
		return itemList[index].getType();
	}
}
